package com.first.course.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.first.common.pojo.EduCourse;
import com.first.common.pojo.TbCheckCourse;
import com.first.common.vo.Result;
import com.first.course.service.EduCourseService;
import com.first.course.service.TbCheckCourseService;
import com.first.course.vo.EduCourseVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: first-project
 * @description:
 * @author: 路志欣
 * @create: 2023-05-30 17:35
 **/
@RestController
@RequestMapping("/cours/course")
public class TbCheckCourseController {
    @Autowired
    private TbCheckCourseService tbCheckCourseService;

    @PostMapping("/findCourseCheck/{pageCurrent}/{pageSize}")
    @ApiOperation(value = "课程列表模糊查询")
    private Result findCheckCourse(@PathVariable Integer pageCurrent, @PathVariable Integer pageSize, @RequestBody EduCourseVo eduCourseVo){
        Page<EduCourse> course = tbCheckCourseService.findCheckCourse(pageCurrent, pageSize, eduCourseVo);
        return Result.success(course);
    }

    @ApiOperation(value = "修改审核表单")
    @PostMapping("/updateCourseCheck")
    private Result updateCourseCheck(@RequestBody TbCheckCourse tbCheckCourse){
        Integer integer = tbCheckCourseService.updateCourseCheck(tbCheckCourse);
        return Result.success(integer);

    }


}
